#!/bin/bash

# define some ansi escape code
CODE_RESET="\033[0m"
CODE_BOLD="\033[1m"
CODE_DIM="\033[2m"
CODE_ITALIC="\033[3m"
CODE_UNDERLINE="\033[4m"
CODE_REVERSED="\033[7m"

CODE_BLACK="\033[30m"
CODE_RED="\033[31m"
CODE_GREEN="\033[32m"
CODE_YELLOW="\033[33m"
CODE_BLUE="\033[34m"
CODE_MAGENTA="\033[35m"
CODE_CYAN="\033[36m"
CODE_WHITE="\033[37m"

CODE_LIGHT_BLACK="\033[90m"
CODE_LIGHT_RED="\033[91m"
CODE_LIGHT_GREEN="\033[92m"
CODE_LIGHT_YELLOW="\033[93m"
CODE_LIGHT_BLUE="\033[94m"
CODE_LIGHT_MAGENTA="\033[95m"
CODE_LIGHT_CYAN="\033[96m"
CODE_LIGHT_WHITE="\033[97m"

CODE_BG_BLACK="\033[40m"
CODE_BG_RED="\033[41m"
CODE_BG_GREEN="\033[42m"
CODE_BG_YELLOW="\033[43m"
CODE_BG_BLUE="\033[44m"
CODE_BG_MAGENTA="\033[45m"
CODE_BG_CYAN="\033[46m"
CODE_BG_WHITE="\033[47m"

CODE_BG_LIGHT_BLACK="\033[100m"
CODE_BG_LIGHT_RED="\033[101m"
CODE_BG_LIGHT_GREEN="\033[102m"
CODE_BG_LIGHT_YELLOW="\033[103m"
CODE_BG_LIGHT_BLUE="\033[104m"
CODE_BG_LIGHT_MAGENTA="\033[105m"
CODE_BG_LIGHT_CYAN="\033[106m"
CODE_BG_LIGHT_WHITE="\033[107m"


clear
echo -e ""
echo -e "                               $CODE_BOLD$CODE_CYAN 苍灵研发服务器 $CODE_RESET "
echo -e "                               $CODE_WHITE ============== $CODE_RESET "
echo -e "                             $CODE_LIGHT_RED$(date '+%Y-%m-%d %H:%M:%S') $CODE_RESET "
echo -e ""
echo -e "      $CODE_BLUE"
echo -e "      - 应用安装在 /root/app 目录下 "
echo -e "      - 数据安装载 /mnt/cangling 目录下 "
echo -e "      $CODE_RESET "
echo -e "      $CODE_LIGHT_MAGENTA "
echo -e "      - 启动服务 ib-lincao start "
echo -e "      - 停止服务 ib-lincao stop "
echo -e "      - 查看服务 ib-lincao ps "
echo -e "      - 更新服务 ib-lincao update "
echo -e "      $CODE_RESET "
# 输出磁盘信息
df -h | grep /dev/sda | awk 'BEGIN {
    # Print the top border
    print "      +----------------------+---------+-------------+"
    print "      | 磁盘名称             | 使用率  |  可用空间   |"
    print "      +----------------------+---------+-------------+"
} 
{
    # Print the data with padding
    printf("      | %-20s | %-7s | %-11s |\n", $6, $5, $4)
} 
END {
    # Print the bottom border
    print "      +----------------------+---------+-------------+"
}'


echo -e "      $CODE_RED安装新的应用 bash <(curl https://gitee.com/satai/cangling/raw/master/install.sh)  很少使用$CODE_RESET " 
echo -e ""
echo -e "      $CODE_DIM$CODE_LIGHT_GREEN >  如果有问题联系 15910868680  zhangjianshe@gmail.com"
echo -e "       >  如果需要更改该提示信息  请编辑  /root/app/tip/readme-cangling.txt"
echo -e "       >  this file is hosted on https://gitee.com/satai/tip.git"
echo -e "      $CODE_RESET "
echo -e "\n"


     






